<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
<html>
<title>Bloomberg Development Environment</title>
<html>
<pre>
// Copyright 2014-2023 Bloomberg Finance L.P.
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// bmqt_resultcode.h                                                  -*-C++-*-
#ifndef INCLUDED_BMQT_RESULTCODE
#define INCLUDED_BMQT_RESULTCODE

//@PURPOSE: Provide enums for various publicly exposed result code.
//
//@CLASSES:
//  bmqt::GenericResult:        generic common result values
//  bmqt::AckResult:            result code status of an ack message
//  bmqt::CloseQueueResult:     result of a close queue operation
//  bmqt::EventBuilderResult:   result of eventBuilder pack operation
//  bmqt::OpenQueueResult:      result of an open queue operation
//  bmqt::ConfigureQueueResult: result of a configure queue operation
//  bmqt::PostResult:           result of a post operation
//
//@DESCRIPTION: This file contains a list of Enums (&#39;bmqt::GenericResult&#39;,
// &#39;bmqt::AckResult&#39;, &#39;bmqt::CloseQueueResult&#39;, &#39;bmqt::EventBuilderResult&#39;,
// &#39;bmqt::OpenQueueResult&#39;, &#39;bmqt::ConfigureQueueResult&#39;, and
// &#39;bmqt::PostResult&#39;) that are publicly exposed to Application (via bmqa), but
// whose value comes from the internal implementation (bmqimp).  Having them
// defined in bmqt allows bmqa to return the enum returned by bmqimp with no
// transformation.
//
// All enums are using the convention that &lt; 0 values are errors, while &gt; 0 are
// warnings.
//
// The &#39;GenericStatus&#39; enum contains values that are common for most or all of
// the other status enums, such as &#39;success&#39;, &#39;timeout&#39;, ...  The values of its
// members can range from -99 to 99.
//
// Each other enum should duplicate any values from the &#39;GenericStatus&#39; one
// that it intends to be able to represent (aliasing the values to the ones
// from the &#39;GenericStatus&#39; enum) and extend with specialized values in the
// &#39;]..., -99[&#39; or &#39;]99, ...[&#39; ranges.
//


// BMQ
#include &lt;bmqscm_version.h&gt;

// BDE
#include &lt;bsl_iosfwd.h&gt;
#include &lt;bsl_string.h&gt;

namespace BloombergLP {
namespace bmqt {

                            // ====================
                            // struct GenericResult
                            // ====================

struct GenericResult {
    // This enum represents generic common status

    // TYPES
    enum Enum {
        e_SUCCESS          =  0 // Operation was success
      , e_UNKNOWN          = -1 // Operation failed for unknown reason
      , e_TIMEOUT          = -2 // Operation timedout
      , e_NOT_CONNECTED    = -3 // Cant process, not connected to the broker
      , e_CANCELED         = -4 // Operation was canceled
      , e_NOT_SUPPORTED    = -5 // Operation is not supported
      , e_REFUSED          = -6 // Operation was refused
      , e_INVALID_ARGUMENT = -7 // An invalid argument was provided
      , e_NOT_READY        = -8 // Not ready to process the request
      , e_LAST             = e_NOT_READY
                                // Used in test driver only, to validate
                                // consistency between this enum and the
                                // &#39;bmqp_ctrlmsg.xsd::StatusCategory&#39; one
    };

    // CLASS METHODS
    static bsl::ostream&amp; print(bsl::ostream&amp;       stream,
                               GenericResult::Enum value,
                               int                 level = 0,
                               int                 spacesPerLevel = 4);
        // Write the string representation of the specified enumeration &#39;value&#39;
        // to the specified output &#39;stream&#39;, and return a reference to
        // &#39;stream&#39;.  Optionally specify an initial indentation &#39;level&#39;, whose
        // absolute value is incremented recursively for nested objects.  If
        // &#39;level&#39; is specified, optionally specify &#39;spacesPerLevel&#39;, whose
        // absolute value indicates the number of spaces per indentation level
        // for this and all of its nested objects.  If &#39;level&#39; is negative,
        // suppress indentation of the first line.  If &#39;spacesPerLevel&#39; is
        // negative, format the entire output on one line, suppressing all but
        // the initial indentation (as governed by &#39;level&#39;).  See &#39;toAscii&#39; for
        // what constitutes the string representation of a
        // &#39;GenericResult::Enum&#39; value.

    static const char *toAscii(GenericResult::Enum value);
        // Return the non-modifiable string representation corresponding to the
        // specified enumeration &#39;value&#39;, if it exists, and a unique (error)
        // string otherwise.  The string representation of &#39;value&#39; matches its
        // corresponding enumerator name with the &#39;e_&#39; prefix elided.  Note
        // that specifying a &#39;value&#39; that does not match any of the enumerators
        // will result in a string representation that is distinct from any of
        // those corresponding to the enumerators, but is otherwise
        // unspecified.

    static bool fromAscii(GenericResult::Enum      *out,
                          const bslstl::StringRef&amp;  str);
        // Return true and fills the specified &#39;out&#39; with the enum value
        // corresponding to the specified &#39;str&#39;, if valid, or return false and
        // leave &#39;out&#39; untouched if &#39;str&#39; doesn&#39;t correspond to any value of
        // the enum.
};

// FREE OPERATORS
bsl::ostream&amp; operator&lt;&lt;(bsl::ostream&amp;       stream,
                         GenericResult::Enum value);
    // Format the specified &#39;value&#39; to the specified output &#39;stream&#39; and return
    // a reference to the modifiable &#39;stream&#39;.


                           // ======================
                           // struct OpenQueueResult
                           // ======================

struct OpenQueueResult {
    // This enum represents the result of an openQueue operation

    // TYPES
    enum Enum {
      // GENERIC
        e_SUCCESS          = GenericResult::e_SUCCESS
      , e_UNKNOWN          = GenericResult::e_UNKNOWN
      , e_TIMEOUT          = GenericResult::e_TIMEOUT
      , e_NOT_CONNECTED    = GenericResult::e_NOT_CONNECTED
      , e_CANCELED         = GenericResult::e_CANCELED
      , e_NOT_SUPPORTED    = GenericResult::e_NOT_SUPPORTED
      , e_REFUSED          = GenericResult::e_REFUSED
      , e_INVALID_ARGUMENT = GenericResult::e_INVALID_ARGUMENT
      , e_NOT_READY        = GenericResult::e_NOT_READY

      // SPECIALIZED
      // WARNINGS
      , e_ALREADY_OPENED      = 100 // The queue is already opened
      , e_ALREADY_IN_PROGRESS = 101 // The queue is already being opened

      // ERRORS
      , e_INVALID_URI              = -100 // The queue uri is invalid
      , e_INVALID_FLAGS            = -101 // The flags provided are invalid
      , e_CORRELATIONID_NOT_UNIQUE = -102 // The correlationdId is not unique
    };

    // CLASS METHODS
    static bsl::ostream&amp; print(bsl::ostream&amp;         stream,
                               OpenQueueResult::Enum value,
                               int                   level          = 0,
                               int                   spacesPerLevel = 4);
        // Write the string representation of the specified enumeration &#39;value&#39;
        // to the specified output &#39;stream&#39;, and return a reference to
        // &#39;stream&#39;.  Optionally specify an initial indentation &#39;level&#39;, whose
        // absolute value is incremented recursively for nested objects.  If
        // &#39;level&#39; is specified, optionally specify &#39;spacesPerLevel&#39;, whose
        // absolute value indicates the number of spaces per indentation level
        // for this and all of its nested objects.  If &#39;level&#39; is negative,
        // suppress indentation of the first line.  If &#39;spacesPerLevel&#39; is
        // negative, format the entire output on one line, suppressing all but
        // the initial indentation (as governed by &#39;level&#39;).  See &#39;toAscii&#39; for
        // what constitutes the string representation of a
        // &#39;OpenQueueResult::Enum&#39; value.

    static const char *toAscii(OpenQueueResult::Enum value);
        // Return the non-modifiable string representation corresponding to the
        // specified enumeration &#39;value&#39;, if it exists, and a unique (error)
        // string otherwise.  The string representation of &#39;value&#39; matches its
        // corresponding enumerator name with the &#39;e_&#39; prefix elided.  Note
        // that specifying a &#39;value&#39; that does not match any of the enumerators
        // will result in a string representation that is distinct from any of
        // those corresponding to the enumerators, but is otherwise
        // unspecified.

    static bool fromAscii(OpenQueueResult::Enum    *out,
                          const bslstl::StringRef&amp;  str);
        // Return true and fills the specified &#39;out&#39; with the enum value
        // corresponding to the specified &#39;str&#39;, if valid, or return false and
        // leave &#39;out&#39; untouched if &#39;str&#39; doesn&#39;t correspond to any value of
        // the enum.
};

// FREE OPERATORS
bsl::ostream&amp; operator&lt;&lt;(bsl::ostream&amp;         stream,
                         OpenQueueResult::Enum value);
    // Format the specified &#39;value&#39; to the specified output &#39;stream&#39; and return
    // a reference to the modifiable &#39;stream&#39;.


                        // ===========================
                        // struct ConfigureQueueResult
                        // ===========================

struct ConfigureQueueResult {
    // This enum represents the result of a configureQueue operation

    // TYPES
    enum Enum {
      // GENERIC
        e_SUCCESS          = GenericResult::e_SUCCESS
      , e_UNKNOWN          = GenericResult::e_UNKNOWN
      , e_TIMEOUT          = GenericResult::e_TIMEOUT
      , e_NOT_CONNECTED    = GenericResult::e_NOT_CONNECTED
      , e_CANCELED         = GenericResult::e_CANCELED
      , e_NOT_SUPPORTED    = GenericResult::e_NOT_SUPPORTED
      , e_REFUSED          = GenericResult::e_REFUSED
      , e_INVALID_ARGUMENT = GenericResult::e_INVALID_ARGUMENT
      , e_NOT_READY        = GenericResult::e_NOT_READY

      // SPECIALIZED WARNINGS
      , e_ALREADY_IN_PROGRESS = 100 // The queue is already being configured

      // ERRORS
      , e_INVALID_QUEUE = -101
    };

    // CLASS METHODS
    static bsl::ostream&amp; print(bsl::ostream&amp;              stream,
                               ConfigureQueueResult::Enum value,
                               int                        level = 0,
                               int                        spacesPerLevel = 4);
        // Write the string representation of the specified enumeration &#39;value&#39;
        // to the specified output &#39;stream&#39;, and return a reference to
        // &#39;stream&#39;.  Optionally specify an initial indentation &#39;level&#39;, whose
        // absolute value is incremented recursively for nested objects.  If
        // &#39;level&#39; is specified, optionally specify &#39;spacesPerLevel&#39;, whose
        // absolute value indicates the number of spaces per indentation level
        // for this and all of its nested objects.  If &#39;level&#39; is negative,
        // suppress indentation of the first line.  If &#39;spacesPerLevel&#39; is
        // negative, format the entire output on one line, suppressing all but
        // the initial indentation (as governed by &#39;level&#39;).  See &#39;toAscii&#39; for
        // what constitutes the string representation of a
        // &#39;ConfigureQueueResult::Enum&#39; value.

    static const char *toAscii(ConfigureQueueResult::Enum value);
        // Return the non-modifiable string representation corresponding to the
        // specified enumeration &#39;value&#39;, if it exists, and a unique (error)
        // string otherwise.  The string representation of &#39;value&#39; matches its
        // corresponding enumerator name with the &#39;e_&#39; prefix elided.  Note
        // that specifying a &#39;value&#39; that does not match any of the enumerators
        // will result in a string representation that is distinct from any of
        // those corresponding to the enumerators, but is otherwise
        // unspecified.

    static bool fromAscii(ConfigureQueueResult::Enum *out,
                          const bslstl::StringRef&amp;    str);
        // Return true and fills the specified &#39;out&#39; with the enum value
        // corresponding to the specified &#39;str&#39;, if valid, or return false and
        // leave &#39;out&#39; untouched if &#39;str&#39; doesn&#39;t correspond to any value of
        // the enum.
};

// FREE OPERATORS
bsl::ostream&amp; operator&lt;&lt;(bsl::ostream&amp;              stream,
                         ConfigureQueueResult::Enum value);
    // Format the specified &#39;value&#39; to the specified output &#39;stream&#39; and return
    // a reference to the modifiable &#39;stream&#39;.


                          // =======================
                          // struct CloseQueueResult
                          // =======================

struct CloseQueueResult {
    // This enum represents the result of a closeQueue operation

    // TYPES
    enum Enum {
      // GENERIC
        e_SUCCESS          = GenericResult::e_SUCCESS
      , e_UNKNOWN          = GenericResult::e_UNKNOWN
      , e_TIMEOUT          = GenericResult::e_TIMEOUT
      , e_NOT_CONNECTED    = GenericResult::e_NOT_CONNECTED
      , e_CANCELED         = GenericResult::e_CANCELED
      , e_NOT_SUPPORTED    = GenericResult::e_NOT_SUPPORTED
      , e_REFUSED          = GenericResult::e_REFUSED
      , e_INVALID_ARGUMENT = GenericResult::e_INVALID_ARGUMENT
      , e_NOT_READY        = GenericResult::e_NOT_READY

      // SPECIALIZED
      // WARNINGS
      , e_ALREADY_CLOSED      = 100 // The queue is already closed
      , e_ALREADY_IN_PROGRESS = 101 // The queue is already being closed

      // ERRORS
      , e_UNKNOWN_QUEUE = -100 // The queue doesn&#39;t exist
      , e_INVALID_QUEUE = -101 // The queue provided is invalid
    };

    // CLASS METHODS
    static bsl::ostream&amp; print(bsl::ostream&amp;          stream,
                               CloseQueueResult::Enum value,
                               int                    level          = 0,
                               int                    spacesPerLevel = 4);
        // Write the string representation of the specified enumeration &#39;value&#39;
        // to the specified output &#39;stream&#39;, and return a reference to
        // &#39;stream&#39;.  Optionally specify an initial indentation &#39;level&#39;, whose
        // absolute value is incremented recursively for nested objects.  If
        // &#39;level&#39; is specified, optionally specify &#39;spacesPerLevel&#39;, whose
        // absolute value indicates the number of spaces per indentation level
        // for this and all of its nested objects.  If &#39;level&#39; is negative,
        // suppress indentation of the first line.  If &#39;spacesPerLevel&#39; is
        // negative, format the entire output on one line, suppressing all but
        // the initial indentation (as governed by &#39;level&#39;).  See &#39;toAscii&#39; for
        // what constitutes the string representation of a
        // &#39;PublishResult::Enum&#39; value.

    static const char *toAscii(CloseQueueResult::Enum value);
        // Return the non-modifiable string representation corresponding to the
        // specified enumeration &#39;value&#39;, if it exists, and a unique (error)
        // string otherwise.  The string representation of &#39;value&#39; matches its
        // corresponding enumerator name with the &#39;e_&#39; prefix elided.  Note
        // that specifying a &#39;value&#39; that does not match any of the enumerators
        // will result in a string representation that is distinct from any of
        // those corresponding to the enumerators, but is otherwise
        // unspecified.

    static bool fromAscii(CloseQueueResult::Enum   *out,
                          const bslstl::StringRef&amp;  str);
        // Return true and fills the specified &#39;out&#39; with the enum value
        // corresponding to the specified &#39;str&#39;, if valid, or return false and
        // leave &#39;out&#39; untouched if &#39;str&#39; doesn&#39;t correspond to any value of
        // the enum.
};

// FREE OPERATORS
bsl::ostream&amp; operator&lt;&lt;(bsl::ostream&amp;          stream,
                         CloseQueueResult::Enum value);
    // Format the specified &#39;value&#39; to the specified output &#39;stream&#39; and return
    // a reference to the modifiable &#39;stream&#39;.


                         // =========================
                         // struct EventBuilderResult
                         // =========================

struct EventBuilderResult {
    // This enum represents the result of an EventBuilder&#39;s packMessage()
    // operation

    // TYPES
    enum Enum {
      // GENERIC
        e_SUCCESS = GenericResult::e_SUCCESS
      , e_UNKNOWN = GenericResult::e_UNKNOWN

      // SPECIALIZED
      // ERRORS
      , e_QUEUE_INVALID          = -100
      , e_QUEUE_READONLY         = -101
      , e_MISSING_CORRELATION_ID = -102
      , e_EVENT_TOO_BIG          = -103
      , e_PAYLOAD_TOO_BIG        = -104
      , e_PAYLOAD_EMPTY          = -105
      , e_OPTION_TOO_BIG         = -106
#ifdef BMQ_ENABLE_MSG_GROUPID
      , e_INVALID_MSG_GROUP_ID   = -107
#endif
      , e_QUEUE_SUSPENDED        = -108
    };

    // CLASS METHODS
    static bsl::ostream&amp; print(bsl::ostream&amp;            stream,
                               EventBuilderResult::Enum value,
                               int                      level          = 0,
                               int                      spacesPerLevel = 4);
        // Write the string representation of the specified enumeration &#39;value&#39;
        // to the specified output &#39;stream&#39;, and return a reference to
        // &#39;stream&#39;.  Optionally specify an initial indentation &#39;level&#39;, whose
        // absolute value is incremented recursively for nested objects.  If
        // &#39;level&#39; is specified, optionally specify &#39;spacesPerLevel&#39;, whose
        // absolute value indicates the number of spaces per indentation level
        // for this and all of its nested objects.  If &#39;level&#39; is negative,
        // suppress indentation of the first line.  If &#39;spacesPerLevel&#39; is
        // negative, format the entire output on one line, suppressing all but
        // the initial indentation (as governed by &#39;level&#39;).  See &#39;toAscii&#39; for
        // what constitutes the string representation of a
        // &#39;EventBuilderResult::Enum&#39; value.

    static const char *toAscii(EventBuilderResult::Enum value);
        // Return the non-modifiable string representation corresponding to the
        // specified enumeration &#39;value&#39;, if it exists, and a unique (error)
        // string otherwise.  The string representation of &#39;value&#39; matches its
        // corresponding enumerator name with the &#39;e_&#39; prefix elided.  Note
        // that specifying a &#39;value&#39; that does not match any of the enumerators
        // will result in a string representation that is distinct from any of
        // those corresponding to the enumerators, but is otherwise
        // unspecified.

    static bool fromAscii(EventBuilderResult::Enum *out,
                          const bslstl::StringRef&amp;  str);
        // Return true and fills the specified &#39;out&#39; with the enum value
        // corresponding to the specified &#39;str&#39;, if valid, or return false and
        // leave &#39;out&#39; untouched if &#39;str&#39; doesn&#39;t correspond to any value of
        // the enum.
};

// FREE OPERATORS
bsl::ostream&amp; operator&lt;&lt;(bsl::ostream&amp;            stream,
                         EventBuilderResult::Enum value);
    // Format the specified &#39;value&#39; to the specified output &#39;stream&#39; and return
    // a reference to the modifiable &#39;stream&#39;.


                              // ================
                              // struct AckResult
                              // ================

struct AckResult {
    // This enum represents the result code status of an ack message

    // TYPES
    enum Enum {
      // GENERIC
        e_SUCCESS          = GenericResult::e_SUCCESS
      , e_UNKNOWN          = GenericResult::e_UNKNOWN
      , e_TIMEOUT          = GenericResult::e_TIMEOUT
      , e_NOT_CONNECTED    = GenericResult::e_NOT_CONNECTED
      , e_CANCELED         = GenericResult::e_CANCELED
      , e_NOT_SUPPORTED    = GenericResult::e_NOT_SUPPORTED
      , e_REFUSED          = GenericResult::e_REFUSED
      , e_INVALID_ARGUMENT = GenericResult::e_INVALID_ARGUMENT
      , e_NOT_READY        = GenericResult::e_NOT_READY

      // SPECIALIZED
      // ERRORS
      , e_LIMIT_MESSAGES        = -100 // Messages limit reached
      , e_LIMIT_BYTES           = -101 // Bytes limit reached

      // TBD:DEPRECATED &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &gt;libbmq-1.3.5
      // The below 4 values are deprecated in favor of the above two ones
      , e_LIMIT_DOMAIN_MESSAGES = -100 // The domain is full (messages)
      , e_LIMIT_DOMAIN_BYTES    = -101 // The domain is full (bytes)
      , e_LIMIT_QUEUE_MESSAGES  = -102 // The queue is full (messages)
      , e_LIMIT_QUEUE_BYTES     = -103 // The queue is full (bytes)
      // TBD:DEPRECATED &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &gt;libbmq-1.3.5
      , e_STORAGE_FAILURE       = -104 // The storage (on disk) is full
    };

    // CLASS METHODS
    static bsl::ostream&amp; print(bsl::ostream&amp;   stream,
                               AckResult::Enum value,
                               int             level          = 0,
                               int             spacesPerLevel = 4);
        // Write the string representation of the specified enumeration &#39;value&#39;
        // to the specified output &#39;stream&#39;, and return a reference to
        // &#39;stream&#39;.  Optionally specify an initial indentation &#39;level&#39;, whose
        // absolute value is incremented recursively for nested objects.  If
        // &#39;level&#39; is specified, optionally specify &#39;spacesPerLevel&#39;, whose
        // absolute value indicates the number of spaces per indentation level
        // for this and all of its nested objects.  If &#39;level&#39; is negative,
        // suppress indentation of the first line.  If &#39;spacesPerLevel&#39; is
        // negative, format the entire output on one line, suppressing all but
        // the initial indentation (as governed by &#39;level&#39;).  See &#39;toAscii&#39; for
        // what constitutes the string representation of a
        // &#39;PublishResult::Enum&#39; value.

    static const char *toAscii(AckResult::Enum value);
        // Return the non-modifiable string representation corresponding to the
        // specified enumeration &#39;value&#39;, if it exists, and a unique (error)
        // string otherwise.  The string representation of &#39;value&#39; matches its
        // corresponding enumerator name with the &#39;e_&#39; prefix elided.  Note
        // that specifying a &#39;value&#39; that does not match any of the enumerators
        // will result in a string representation that is distinct from any of
        // those corresponding to the enumerators, but is otherwise
        // unspecified.

    static bool fromAscii(AckResult::Enum          *out,
                          const bslstl::StringRef&amp;  str);
        // Return true and fills the specified &#39;out&#39; with the enum value
        // corresponding to the specified &#39;str&#39;, if valid, or return false and
        // leave &#39;out&#39; untouched if &#39;str&#39; doesn&#39;t correspond to any value of
        // the enum.
};

// FREE OPERATORS
bsl::ostream&amp; operator&lt;&lt;(bsl::ostream&amp;   stream,
                         AckResult::Enum value);
    // Format the specified &#39;value&#39; to the specified output &#39;stream&#39; and return
    // a reference to the modifiable &#39;stream&#39;.


                             // =================
                             // struct PostResult
                             // =================

struct PostResult {
    // This enum represents the result code status of a post message

    // TYPES
    enum Enum {
      // GENERIC
        e_SUCCESS          = GenericResult::e_SUCCESS
      , e_UNKNOWN          = GenericResult::e_UNKNOWN
      , e_TIMEOUT          = GenericResult::e_TIMEOUT
      , e_NOT_CONNECTED    = GenericResult::e_NOT_CONNECTED
      , e_CANCELED         = GenericResult::e_CANCELED
      , e_NOT_SUPPORTED    = GenericResult::e_NOT_SUPPORTED
      , e_REFUSED          = GenericResult::e_REFUSED
      , e_INVALID_ARGUMENT = GenericResult::e_INVALID_ARGUMENT
      , e_NOT_READY        = GenericResult::e_NOT_READY

      // SPECIALIZED
      // WARNINGS
      , e_BW_LIMIT         = 100 // The application has been posting too much
                                 // data, and the IO or broker are temporarily
                                 // rejecting new messages.
    };

    // CLASS METHODS
    static bsl::ostream&amp; print(bsl::ostream&amp;    stream,
                               PostResult::Enum value,
                               int              level = 0,
                               int              spacesPerLevel = 4);
        // Write the string representation of the specified enumeration &#39;value&#39;
        // to the specified output &#39;stream&#39;, and return a reference to
        // &#39;stream&#39;.  Optionally specify an initial indentation &#39;level&#39;, whose
        // absolute value is incremented recursively for nested objects.  If
        // &#39;level&#39; is specified, optionally specify &#39;spacesPerLevel&#39;, whose
        // absolute value indicates the number of spaces per indentation level
        // for this and all of its nested objects.  If &#39;level&#39; is negative,
        // suppress indentation of the first line.  If &#39;spacesPerLevel&#39; is
        // negative, format the entire output on one line, suppressing all but
        // the initial indentation (as governed by &#39;level&#39;).  See &#39;toAscii&#39; for
        // what constitutes the string representation of a
        // &#39;PublishResult::Enum&#39; value.

    static const char *toAscii(PostResult::Enum value);
        // Return the non-modifiable string representation corresponding to the
        // specified enumeration &#39;value&#39;, if it exists, and a unique (error)
        // string otherwise.  The string representation of &#39;value&#39; matches its
        // corresponding enumerator name with the &#39;e_&#39; prefix elided.  Note
        // that specifying a &#39;value&#39; that does not match any of the enumerators
        // will result in a string representation that is distinct from any of
        // those corresponding to the enumerators, but is otherwise
        // unspecified.

    static bool fromAscii(PostResult::Enum         *out,
                          const bslstl::StringRef&amp;  str);
        // Return true and fills the specified &#39;out&#39; with the enum value
        // corresponding to the specified &#39;str&#39;, if valid, or return false and
        // leave &#39;out&#39; untouched if &#39;str&#39; doesn&#39;t correspond to any value of
        // the enum.
};

// FREE OPERATORS
bsl::ostream&amp; operator&lt;&lt;(bsl::ostream&amp;    stream,
                         PostResult::Enum value);
    // Format the specified &#39;value&#39; to the specified output &#39;stream&#39; and return
    // a reference to the modifiable &#39;stream&#39;.

}  // close package namespace


// ============================================================================
//                             INLINE DEFINITIONS
// ============================================================================


                            // --------------------
                            // struct GenericResult
                            // --------------------

inline
bsl::ostream&amp;
bmqt::operator&lt;&lt;(bsl::ostream&amp;             stream,
                 bmqt::GenericResult::Enum value)
{
    return bmqt::GenericResult::print(stream, value, 0 , -1);
}


                           // ----------------------
                           // struct OpenQueueResult
                           // ----------------------

inline
bsl::ostream&amp;
bmqt::operator&lt;&lt;(bsl::ostream&amp;               stream,
                 bmqt::OpenQueueResult::Enum value)
{
    return bmqt::OpenQueueResult::print(stream, value, 0 , -1);
}

                        // ---------------------------
                        // struct ConfigureQueueResult
                        // ---------------------------

inline
bsl::ostream&amp;
bmqt::operator&lt;&lt;(bsl::ostream&amp;                    stream,
                 bmqt::ConfigureQueueResult::Enum value)
{
    return bmqt::ConfigureQueueResult::print(stream, value, 0 , -1);
}

                          // -----------------------
                          // struct CloseQueueResult
                          // -----------------------

inline
bsl::ostream&amp;
bmqt::operator&lt;&lt;(bsl::ostream&amp;                stream,
                 bmqt::CloseQueueResult::Enum value)
{
    return bmqt::CloseQueueResult::print(stream, value, 0 , -1);
}

                         // -------------------------
                         // struct EventBuilderResult
                         // -------------------------

inline
bsl::ostream&amp;
bmqt::operator&lt;&lt;(bsl::ostream&amp;                  stream,
                 bmqt::EventBuilderResult::Enum value)
{
    return bmqt::EventBuilderResult::print(stream, value, 0 , -1);
}

                              // ----------------
                              // struct AckResult
                              // ----------------

inline
bsl::ostream&amp;
bmqt::operator&lt;&lt;(bsl::ostream&amp;         stream,
                 bmqt::AckResult::Enum value)
{
    return bmqt::AckResult::print(stream, value, 0 , -1);
}


                             // -----------------
                             // struct PostResult
                             // -----------------

inline
bsl::ostream&amp;
bmqt::operator&lt;&lt;(bsl::ostream&amp;          stream,
                 bmqt::PostResult::Enum value)
{
    return bmqt::PostResult::print(stream, value, 0 , -1);
}

}  // close enterprise namespace

#endif
</pre>
</body>
</html>
